using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.S_PayTypeTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HLShop_PayTypeTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HLShop_PayTypeTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HLShop_PayType";
			dataTableMapping.ColumnMappings.Add("TypeID", "TypeID");
			dataTableMapping.ColumnMappings.Add("TypeName", "TypeName");
			dataTableMapping.ColumnMappings.Add("Intro", "Intro");
			dataTableMapping.ColumnMappings.Add("Discount", "Discount");
			dataTableMapping.ColumnMappings.Add("IsDefault", "IsDefault");
			dataTableMapping.ColumnMappings.Add("IsDisabled", "IsDisabled");
			dataTableMapping.ColumnMappings.Add("PayAttribute", "PayAttribute");
			dataTableMapping.ColumnMappings.Add("UserID", "UserID");
			dataTableMapping.ColumnMappings.Add("OnlinePayFlag", "OnlinePayFlag");
			dataTableMapping.ColumnMappings.Add("OnlinePayAccount", "OnlinePayAccount");
			dataTableMapping.ColumnMappings.Add("Md5Key", "Md5Key");
			dataTableMapping.ColumnMappings.Add("U_Email", "U_Email");
			dataTableMapping.ColumnMappings.Add("U_SavePassword", "U_SavePassword");
			dataTableMapping.ColumnMappings.Add("U_Key", "U_Key");
			dataTableMapping.ColumnMappings.Add("OnlinePay", "OnlinePay");
			dataTableMapping.ColumnMappings.Add("OutLinePayType", "OutLinePayType");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HLShop_PayType] WHERE (([TypeID] = @Original_TypeID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_TypeID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HLShop_PayType] ([UserID], [TypeName], [Intro], [Discount], [IsDefault], [IsDisabled], [PayAttribute], [OnlinePayFlag], [OnlinePayAccount], [Md5Key], [U_Email], [U_SavePassword], [U_Key], [OnlinePay], [OutLinePayType]) VALUES (@UserID, @TypeName, @Intro, @Discount, @IsDefault, @IsDisabled, @PayAttribute, @OnlinePayFlag, @OnlinePayAccount, @Md5Key, @U_Email, @U_SavePassword, @U_Key, @OnlinePay, @OutLinePayType)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@TypeName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "TypeName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Intro", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Intro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Discount", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "Discount", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsDefault", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefault", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@IsDisabled", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDisabled", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@PayAttribute", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PayAttribute", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OnlinePayFlag", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "OnlinePayFlag", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OnlinePayAccount", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "OnlinePayAccount", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Md5Key", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Md5Key", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@U_Email", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "U_Email", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@U_SavePassword", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "U_SavePassword", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@U_Key", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "U_Key", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OnlinePay", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "OnlinePay", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OutLinePayType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OutLinePayType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HLShop_PayType] SET [UserID] = @UserID, [TypeName] = @TypeName, [Intro] = @Intro, [Discount] = @Discount, [IsDefault] = @IsDefault, [IsDisabled] = @IsDisabled, [PayAttribute] = @PayAttribute, [OnlinePayFlag] = @OnlinePayFlag, [OnlinePayAccount] = @OnlinePayAccount, [Md5Key] = @Md5Key, [U_Email] = @U_Email, [U_SavePassword] = @U_SavePassword, [U_Key] = @U_Key, [OnlinePay] = @OnlinePay, [OutLinePayType] = @OutLinePayType WHERE (([TypeID] = @Original_TypeID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@TypeName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "TypeName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Intro", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Intro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Discount", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 2, "Discount", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsDefault", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDefault", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@IsDisabled", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "IsDisabled", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@PayAttribute", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "PayAttribute", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OnlinePayFlag", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "OnlinePayFlag", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OnlinePayAccount", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "OnlinePayAccount", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Md5Key", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "Md5Key", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@U_Email", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "U_Email", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@U_SavePassword", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "U_SavePassword", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@U_Key", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "U_Key", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OnlinePay", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "OnlinePay", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OutLinePayType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OutLinePayType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_TypeID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[15];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT TypeID, UserID, TypeName, Intro, Discount, IsDefault, IsDisabled, PayAttribute, \r\n      OnlinePayFlag, OnlinePayAccount, Md5Key, U_Email, U_SavePassword, U_Key, \r\n      OnlinePay, OutLinePayType\r\nFROM HLShop_PayType";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "SELECT COUNT(TypeID) FROM HLShop_PayType\r\nWHERE UserID=@UserID";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "DELETE FROM [HLShop_PayType] WHERE ([TypeID] = @TypeID) AND ([UserID]=@UserID)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@TypeID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "SELECT Discount, Intro, IsDefault, IsDisabled, Md5Key, OnlinePay, OnlinePayAccount, OnlinePayFlag, OutLinePayType, PayAttribute, TypeID, TypeName, U_Email, U_Key, U_SavePassword, UserID FROM HLShop_PayType WHERE (UserID = - 2)";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "\r\n                      SELECT TypeID, UserID, TypeName, Intro, Discount, IsDefault, IsDisabled, PayAttribute,\r\n                      OnlinePayFlag, OnlinePayAccount, Md5Key, U_Email, U_SavePassword, U_Key,\r\n                      OnlinePay,OutLinePayType\r\n                      FROM HLShop_PayType where IsDisabled=0 and userid=@userid  and PayAttribute=@PayAttribute\r\n                    ";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@userid", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4].Parameters.Add(new SqlParameter("@PayAttribute", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "PayAttribute", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "PR_GetPayTypeByTypeIDArrayUserIDNotDisable";
			this._commandCollection[5].CommandType = CommandType.StoredProcedure;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5].Parameters.Add(new SqlParameter("@TypeIDArray", SqlDbType.VarChar, 100, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "SELECT TypeID, UserID, TypeName, Intro, Discount, IsDefault, IsDisabled, PayAttribute, \r\n      OnlinePayFlag, OnlinePayAccount, Md5Key, U_Email, U_SavePassword, U_Key, \r\n      OnlinePay\r\nFROM HLShop_PayType\r\nWHERE TypeID=@TypeID AND UserID=@UserID AND IsDisabled=0";
			this._commandCollection[6].CommandType = CommandType.Text;
			this._commandCollection[6].Parameters.Add(new SqlParameter("@TypeID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[7] = new SqlCommand();
			this._commandCollection[7].Connection = this.Connection;
			this._commandCollection[7].CommandText = "SELECT TypeID, UserID, TypeName, Intro, Discount, IsDefault, IsDisabled, PayAttribute, \r\n      OnlinePayFlag, OnlinePayAccount, Md5Key, U_Email, U_SavePassword, U_Key, \r\n      OnlinePay\r\nFROM HLShop_PayType where userid=@userid";
			this._commandCollection[7].CommandType = CommandType.Text;
			this._commandCollection[7].Parameters.Add(new SqlParameter("@userid", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8] = new SqlCommand();
			this._commandCollection[8].Connection = this.Connection;
			this._commandCollection[8].CommandText = "SELECT TypeID, UserID, TypeName, Intro, Discount, IsDefault, IsDisabled, PayAttribute, \r\n      OnlinePayFlag, OnlinePayAccount, Md5Key, U_Email, U_SavePassword, U_Key, \r\n      OnlinePay\r\nFROM HLShop_PayType\r\nWHERE UserID=@UserID AND IsDisabled=0 order by IsDefault desc";
			this._commandCollection[8].CommandType = CommandType.Text;
			this._commandCollection[8].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9] = new SqlCommand();
			this._commandCollection[9].Connection = this.Connection;
			this._commandCollection[9].CommandText = "Pr_GetPayTypeByUSERIDTypeIDStatus";
			this._commandCollection[9].CommandType = CommandType.StoredProcedure;
			this._commandCollection[9].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9].Parameters.Add(new SqlParameter("@TypeID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9].Parameters.Add(new SqlParameter("@USERID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[9].Parameters.Add(new SqlParameter("@Status", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10] = new SqlCommand();
			this._commandCollection[10].Connection = this.Connection;
			this._commandCollection[10].CommandText = "SELECT TypeID, UserID, TypeName, Intro, Discount, IsDefault, IsDisabled, PayAttribute, \r\n      OnlinePayFlag, OnlinePayAccount, Md5Key, U_Email, U_SavePassword, U_Key, \r\n      OnlinePay\r\nFROM HLShop_PayType\r\nWHERE UserID=@UserID AND TypeName=@TypeName";
			this._commandCollection[10].CommandType = CommandType.Text;
			this._commandCollection[10].Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[10].Parameters.Add(new SqlParameter("@TypeName", SqlDbType.NVarChar, 50, ParameterDirection.Input, 0, 0, "TypeName", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[11] = new SqlCommand();
			this._commandCollection[11].Connection = this.Connection;
			this._commandCollection[11].CommandText = "SELECT Discount, Intro, IsDefault, IsDisabled, Md5Key, OnlinePay, OnlinePayAccount, OnlinePayFlag, OutLinePayType, PayAttribute, TypeID, TypeName, U_Email, U_Key, U_SavePassword, UserID FROM HLShop_PayType WHERE (TypeID = @Typeid)";
			this._commandCollection[11].CommandType = CommandType.Text;
			this._commandCollection[11].Parameters.Add(new SqlParameter("@Typeid", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "TypeID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[12] = new SqlCommand();
			this._commandCollection[12].Connection = this.Connection;
			this._commandCollection[12].CommandText = "SELECT Discount, Intro, IsDefault, IsDisabled, Md5Key, OnlinePay, OnlinePayAccount, OnlinePayFlag, OutLinePayType, PayAttribute, TypeID, TypeName, U_Email, U_Key, U_SavePassword, UserID FROM HLShop_PayType WHERE (UserID = - 2) AND (IsDisabled = 0)";
			this._commandCollection[12].CommandType = CommandType.Text;
			this._commandCollection[13] = new SqlCommand();
			this._commandCollection[13].Connection = this.Connection;
			this._commandCollection[13].CommandText = "SELECT TypeID, UserID, TypeName, Intro, Discount, IsDefault, IsDisabled, PayAttribute, \r\n      OnlinePayFlag, OnlinePayAccount, Md5Key, U_Email, U_SavePassword, U_Key, \r\n      OnlinePay\r\nFROM HLShop_PayType where  UserID=@userid and OnlinePay=@OnlinePay";
			this._commandCollection[13].CommandType = CommandType.Text;
			this._commandCollection[13].Parameters.Add(new SqlParameter("@userid", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[13].Parameters.Add(new SqlParameter("@OnlinePay", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, "OnlinePay", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[14] = new SqlCommand();
			this._commandCollection[14].Connection = this.Connection;
			this._commandCollection[14].CommandText = "pr_setPayTypeAsDefault";
			this._commandCollection[14].CommandType = CommandType.StoredProcedure;
			this._commandCollection[14].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[14].Parameters.Add(new SqlParameter("@TypeID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetAllPayType()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetHowavePayType()
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetOnlinePayType(int userid, int? PayAttribute)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			this.Adapter.SelectCommand.Parameters[0].Value = userid;
			if (PayAttribute.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = PayAttribute.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetPayTypeByTypeIDArrayUserIDNotDisable(int? UserID, string TypeIDArray)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			if (UserID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = UserID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (TypeIDArray == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = TypeIDArray;
			}
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetPayTypeByTypeIDUserIDNotDisabled(int TypeID, int UserID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[6];
			this.Adapter.SelectCommand.Parameters[0].Value = TypeID;
			this.Adapter.SelectCommand.Parameters[1].Value = UserID;
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetPayTypeByUserID(int userid)
		{
			this.Adapter.SelectCommand = this.CommandCollection[7];
			this.Adapter.SelectCommand.Parameters[0].Value = userid;
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetPayTypeByUserIdNotDisabled(int UserID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[8];
			this.Adapter.SelectCommand.Parameters[0].Value = UserID;
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetPayTypeByUserIDTypeidStatus(int? TypeID, int? USERID, int? Status)
		{
			this.Adapter.SelectCommand = this.CommandCollection[9];
			if (TypeID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = TypeID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (USERID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = USERID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			if (Status.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = Status.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetPayTypeByUserIDTypeName(int UserID, string TypeName)
		{
			this.Adapter.SelectCommand = this.CommandCollection[10];
			this.Adapter.SelectCommand.Parameters[0].Value = UserID;
			if (TypeName == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = TypeName;
			}
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetTypeByID(int Typeid)
		{
			this.Adapter.SelectCommand = this.CommandCollection[11];
			this.Adapter.SelectCommand.Parameters[0].Value = Typeid;
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable GetUnDisabledHowavePay()
		{
			this.Adapter.SelectCommand = this.CommandCollection[12];
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual S_PayType.HLShop_PayTypeDataTable HaveOnlinePay(int userid, string OnlinePay)
		{
			this.Adapter.SelectCommand = this.CommandCollection[13];
			this.Adapter.SelectCommand.Parameters[0].Value = userid;
			if (OnlinePay == null)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = OnlinePay;
			}
			S_PayType.HLShop_PayTypeDataTable hLShop_PayTypeDataTable = new S_PayType.HLShop_PayTypeDataTable();
			this.Adapter.Fill(hLShop_PayTypeDataTable);
			return hLShop_PayTypeDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_PayType.HLShop_PayTypeDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(S_PayType dataSet)
		{
			return this.Adapter.Update(dataSet, "HLShop_PayType");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual object CountPayTypeBySalerID(int UserID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			sqlCommand.Parameters[0].Value = UserID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			object obj;
			try
			{
				obj = sqlCommand.ExecuteScalar();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			object result;
			if (obj == null || obj.GetType() == typeof(System.DBNull))
			{
				result = null;
			}
			else
			{
				result = obj;
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteType(int TypeID, int UserID)
		{
			SqlCommand sqlCommand = this.CommandCollection[2];
			sqlCommand.Parameters[0].Value = TypeID;
			sqlCommand.Parameters[1].Value = UserID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int SetPayTypeAsDefault(int? TypeID)
		{
			SqlCommand sqlCommand = this.CommandCollection[14];
			if (TypeID.HasValue)
			{
				sqlCommand.Parameters[1].Value = TypeID.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
